package com.permissions.dispatcher.processor.exception;

import com.permissions.dispatcher.processor.util.Extensions;

import javax.lang.model.element.ExecutableElement;

/**
 * 错误返回类型异常
 */
public class WrongReturnTypeException extends RuntimeException {

    /**
     * 错误返回类型异常
     */
    public WrongReturnTypeException(ExecutableElement executableElement) {
        super(
                "Method '"
                        + Extensions.simpleString(executableElement)
                        + "()' must specify return type 'void', not '"
                        + executableElement.getReturnType().toString()
                        + "'");
    }
}
